Optimal. Leaf size=502 \[ \frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {b^2 (e+f x)^2 \log \left (1-e^{2 (c+d x)}\right )}{a^3 d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}+\frac {2 b f^2 \text {PolyLog}\left (2,-e^{c+d x}\right )}{a^2 d^3}-\frac {2 b f^2 \text {PolyLog}\left (2,e^{c+d x}\right )}{a^2 d^3}-\frac {2 b^2 f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^2}-\frac {2 b^2 f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^2}+\frac {b^2 f (e+f x) \text {PolyLog}\left (2,e^{2 (c+d x)}\right )}{a^3 d^2}+\frac {2 b^2 f^2 \text {PolyLog}\left (3,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^3}+\frac {2 b^2 f^2 \text {PolyLog}\left (3,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^3}-\frac {b^2 f^2 \text {PolyLog}\left (3,e^{2 (c+d x)}\right )}{2 a^3 d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.69, antiderivative size = 502, normalized size of antiderivative = 1.00, number of steps
used = 26, number of rules used = 14, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used =
{5706, 5560, 4269, 3556, 4267, 2317, 2438, 5688, 3797, 2221, 2611, 2320, 6724, 5680}
\begin {gather*} -\frac {b^2 f^2 \text {Li}_3\left (e^{2 (c+d x)}\right )}{2 a^3 d^3}+\frac {b^2 f (e+f x) \text {Li}_2\left (e^{2 (c+d x)}\right )}{a^3 d^2}+\frac {b^2 (e+f x)^2 \log \left (1-e^{2 (c+d x)}\right )}{a^3 d}+\frac {2 b f^2 \text {Li}_2\left (-e^{c+d x}\right )}{a^2 d^3}-\frac {2 b f^2 \text {Li}_2\left (e^{c+d x}\right )}{a^2 d^3}+\frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}+\frac {2 b^2 f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^3}+\frac {2 b^2 f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^3}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^2}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^2}-\frac {b^2 (e+f x)^2 \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}+1\right )}{a^3 d}-\frac {b^2 (e+f x)^2 \log \left (\frac {b e^{c+d x}}{\sqrt {a^2+b^2}+a}+1\right )}{a^3 d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}-\frac {f (e+f x) \coth (c+d x)}{a d^2}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2221
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 3556
Rule 3797
Rule 4267
Rule 4269
Rule 5560
Rule 5680
Rule 5688
Rule 5706
Rule 6724
Rubi steps
\begin {align*} \int \frac {(e+f x)^2 \coth (c+d x) \text {csch}^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=\frac {\int (e+f x)^2 \coth (c+d x) \text {csch}^2(c+d x) \, dx}{a}-\frac {b \int \frac {(e+f x)^2 \coth (c+d x) \text {csch}(c+d x)}{a+b \sinh (c+d x)} \, dx}{a}\\ &=-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}-\frac {b \int (e+f x)^2 \coth (c+d x) \text {csch}(c+d x) \, dx}{a^2}+\frac {b^2 \int \frac {(e+f x)^2 \coth (c+d x)}{a+b \sinh (c+d x)} \, dx}{a^2}+\frac {f \int (e+f x) \text {csch}^2(c+d x) \, dx}{a d}\\ &=-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}+\frac {b^2 \int (e+f x)^2 \coth (c+d x) \, dx}{a^3}-\frac {b^3 \int \frac {(e+f x)^2 \cosh (c+d x)}{a+b \sinh (c+d x)} \, dx}{a^3}-\frac {(2 b f) \int (e+f x) \text {csch}(c+d x) \, dx}{a^2 d}+\frac {f^2 \int \coth (c+d x) \, dx}{a d^2}\\ &=\frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}-\frac {\left (2 b^2\right ) \int \frac {e^{2 (c+d x)} (e+f x)^2}{1-e^{2 (c+d x)}} \, dx}{a^3}-\frac {b^3 \int \frac {e^{c+d x} (e+f x)^2}{a-\sqrt {a^2+b^2}+b e^{c+d x}} \, dx}{a^3}-\frac {b^3 \int \frac {e^{c+d x} (e+f x)^2}{a+\sqrt {a^2+b^2}+b e^{c+d x}} \, dx}{a^3}+\frac {\left (2 b f^2\right ) \int \log \left (1-e^{c+d x}\right ) \, dx}{a^2 d^2}-\frac {\left (2 b f^2\right ) \int \log \left (1+e^{c+d x}\right ) \, dx}{a^2 d^2}\\ &=\frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {b^2 (e+f x)^2 \log \left (1-e^{2 (c+d x)}\right )}{a^3 d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}+\frac {\left (2 b^2 f\right ) \int (e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right ) \, dx}{a^3 d}+\frac {\left (2 b^2 f\right ) \int (e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right ) \, dx}{a^3 d}-\frac {\left (2 b^2 f\right ) \int (e+f x) \log \left (1-e^{2 (c+d x)}\right ) \, dx}{a^3 d}+\frac {\left (2 b f^2\right ) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{c+d x}\right )}{a^2 d^3}-\frac {\left (2 b f^2\right ) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{c+d x}\right )}{a^2 d^3}\\ &=\frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {b^2 (e+f x)^2 \log \left (1-e^{2 (c+d x)}\right )}{a^3 d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}+\frac {2 b f^2 \text {Li}_2\left (-e^{c+d x}\right )}{a^2 d^3}-\frac {2 b f^2 \text {Li}_2\left (e^{c+d x}\right )}{a^2 d^3}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^2}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^2}+\frac {b^2 f (e+f x) \text {Li}_2\left (e^{2 (c+d x)}\right )}{a^3 d^2}-\frac {\left (b^2 f^2\right ) \int \text {Li}_2\left (e^{2 (c+d x)}\right ) \, dx}{a^3 d^2}+\frac {\left (2 b^2 f^2\right ) \int \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right ) \, dx}{a^3 d^2}+\frac {\left (2 b^2 f^2\right ) \int \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right ) \, dx}{a^3 d^2}\\ &=\frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {b^2 (e+f x)^2 \log \left (1-e^{2 (c+d x)}\right )}{a^3 d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}+\frac {2 b f^2 \text {Li}_2\left (-e^{c+d x}\right )}{a^2 d^3}-\frac {2 b f^2 \text {Li}_2\left (e^{c+d x}\right )}{a^2 d^3}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^2}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^2}+\frac {b^2 f (e+f x) \text {Li}_2\left (e^{2 (c+d x)}\right )}{a^3 d^2}-\frac {\left (b^2 f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2(x)}{x} \, dx,x,e^{2 (c+d x)}\right )}{2 a^3 d^3}+\frac {\left (2 b^2 f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (\frac {b x}{-a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{a^3 d^3}+\frac {\left (2 b^2 f^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {b x}{a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{a^3 d^3}\\ &=\frac {4 b f (e+f x) \tanh ^{-1}\left (e^{c+d x}\right )}{a^2 d^2}-\frac {f (e+f x) \coth (c+d x)}{a d^2}+\frac {b (e+f x)^2 \text {csch}(c+d x)}{a^2 d}-\frac {(e+f x)^2 \text {csch}^2(c+d x)}{2 a d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d}-\frac {b^2 (e+f x)^2 \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d}+\frac {b^2 (e+f x)^2 \log \left (1-e^{2 (c+d x)}\right )}{a^3 d}+\frac {f^2 \log (\sinh (c+d x))}{a d^3}+\frac {2 b f^2 \text {Li}_2\left (-e^{c+d x}\right )}{a^2 d^3}-\frac {2 b f^2 \text {Li}_2\left (e^{c+d x}\right )}{a^2 d^3}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^2}-\frac {2 b^2 f (e+f x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^2}+\frac {b^2 f (e+f x) \text {Li}_2\left (e^{2 (c+d x)}\right )}{a^3 d^2}+\frac {2 b^2 f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{a^3 d^3}+\frac {2 b^2 f^2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{a^3 d^3}-\frac {b^2 f^2 \text {Li}_3\left (e^{2 (c+d x)}\right )}{2 a^3 d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(1161\) vs. \(2(502)=1004\).
time = 22.09, size = 1161, normalized size = 2.31 \begin {gather*} \frac {b (e+f x)^2 \text {csch}(c)}{a^2 d}+\frac {\left (-e^2-2 e f x-f^2 x^2\right ) \text {csch}^2\left (\frac {c}{2}+\frac {d x}{2}\right )}{8 a d}-\frac {12 d e^{2 c} \left (b^2 d^2 e^2+a^2 f^2\right ) x-12 d \left (-1+e^{2 c}\right ) \left (b^2 d^2 e^2+a^2 f^2\right ) x+12 b^2 d^3 e f x^2+4 b^2 d^3 f^2 x^3-24 a b d e \left (-1+e^{2 c}\right ) f \tanh ^{-1}\left (e^{c+d x}\right )+6 b^2 d^2 e^2 \left (-1+e^{2 c}\right ) \left (2 d x-\log \left (1-e^{2 (c+d x)}\right )\right )+6 a^2 \left (-1+e^{2 c}\right ) f^2 \left (2 d x-\log \left (1-e^{2 (c+d x)}\right )\right )+12 a b \left (-1+e^{2 c}\right ) f^2 \left (d x \left (\log \left (1-e^{c+d x}\right )-\log \left (1+e^{c+d x}\right )\right )-\text {PolyLog}\left (2,-e^{c+d x}\right )+\text {PolyLog}\left (2,e^{c+d x}\right )\right )+6 b^2 d e \left (-1+e^{2 c}\right ) f \left (2 d x \left (d x-\log \left (1-e^{2 (c+d x)}\right )\right )-\text {PolyLog}\left (2,e^{2 (c+d x)}\right )\right )+b^2 \left (-1+e^{2 c}\right ) f^2 \left (2 d^2 x^2 \left (2 d x-3 \log \left (1-e^{2 (c+d x)}\right )\right )-6 d x \text {PolyLog}\left (2,e^{2 (c+d x)}\right )+3 \text {PolyLog}\left (3,e^{2 (c+d x)}\right )\right )}{6 a^3 d^3 \left (-1+e^{2 c}\right )}+\frac {b^2 \left (\frac {2 e^{2 c} x \left (3 e^2+3 e f x+f^2 x^2\right )}{-1+e^{2 c}}-\frac {3 \left (d^2 e^2 \log \left (2 a e^{c+d x}+b \left (-1+e^{2 (c+d x)}\right )\right )+2 d^2 e f x \log \left (1+\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+d^2 f^2 x^2 \log \left (1+\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+2 d^2 e f x \log \left (1+\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+d^2 f^2 x^2 \log \left (1+\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+2 d f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )+2 d f (e+f x) \text {PolyLog}\left (2,-\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )-2 f^2 \text {PolyLog}\left (3,-\frac {b e^{2 c+d x}}{a e^c-\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )-2 f^2 \text {PolyLog}\left (3,-\frac {b e^{2 c+d x}}{a e^c+\sqrt {\left (a^2+b^2\right ) e^{2 c}}}\right )\right )}{d^3}\right )}{3 a^3}+\frac {\left (e^2+2 e f x+f^2 x^2\right ) \text {sech}^2\left (\frac {c}{2}+\frac {d x}{2}\right )}{8 a d}+\frac {\text {sech}\left (\frac {c}{2}\right ) \text {sech}\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (-b d e^2 \sinh \left (\frac {d x}{2}\right )-a e f \sinh \left (\frac {d x}{2}\right )-2 b d e f x \sinh \left (\frac {d x}{2}\right )-a f^2 x \sinh \left (\frac {d x}{2}\right )-b d f^2 x^2 \sinh \left (\frac {d x}{2}\right )\right )}{2 a^2 d^2}+\frac {\text {csch}\left (\frac {c}{2}\right ) \text {csch}\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (-b d e^2 \sinh \left (\frac {d x}{2}\right )+a e f \sinh \left (\frac {d x}{2}\right )-2 b d e f x \sinh \left (\frac {d x}{2}\right )+a f^2 x \sinh \left (\frac {d x}{2}\right )-b d f^2 x^2 \sinh \left (\frac {d x}{2}\right )\right )}{2 a^2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 2.47, size = 0, normalized size = 0.00 \[\int \frac {\left (f x +e \right )^{2} \coth \left (d x +c \right ) \mathrm {csch}\left (d x +c \right )^{2}}{a +b \sinh \left (d x +c \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 9084 vs.
\(2 (482) = 964\).
time = 0.43, size = 9084, normalized size = 18.10 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\mathrm {coth}\left (c+d\,x\right )\,{\left (e+f\,x\right )}^2}{{\mathrm {sinh}\left (c+d\,x\right )}^2\,\left (a+b\,\mathrm {sinh}\left (c+d\,x\right )\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________